home *** CD-ROM | disk | FTP | other *** search
- ' WDI.Bas
- ' Portions Copyright 1987-1990 Microsoft Corp.
- WindowDoInit:
-
- ' ====================================================================
- ' Simply abort if there is no window open.
- ' ====================================================================
-
- windo = WindowCurrent
- IF windo = 0 THEN EXIT SUB
-
- REDIM HSClick(MAXHOTSPOT) AS hotSpotType
- REDIM HSRel(MAXHOTSPOT) AS hotSpotType
-
- ExitFlag = FALSE
- ButtonHighLight = FALSE
-
- border$ = WindowBorder$(GloWindow(windo).windowType)
- WindowDoMode = 2
-
- ' ====================================================================
- ' If startEdit>0, assign the index value to currEditField, and set
- ' WindowDoMode to 1
- ' ====================================================================
-
- IF startEdit > 0 THEN
- index = FindEditField(startEdit)
- IF index > 0 THEN
- currEditField = index
- WindowDoMode = 1
- origCursorRow = GloWindow(windo).row1 + GloEdit(index).row - 1
- origCursorCol = GloWindow(windo).col1 + GloEdit(index).col - 1
- END IF
- END IF
-
- ' ====================================================================
- ' If start button>0, then set current cursor location properly
- ' ====================================================================
-
- IF startButton > 0 THEN
- index = FindButton(startButton)
- IF index > 0 THEN
- currButton = index
- origCursorRow = GloWindow(windo).row1 _
- + GloButton(index).row1 - 1
- origCursorCol = GloWindow(windo).col1 + GloButton(index).col1
-
- ' ============================================================
- ' For area buttons decrement the cursor position
- ' ============================================================
-
- SELECT CASE GloButton(index).buttonType
- CASE 4
- origCursorCol = origCursorCol - 1
- CASE 5
- origCursorRow = origCursorRow + 1
- origCursorCol = origCursorCol + 1
- CASE ELSE
- END SELECT
-
- END IF
- END IF
-
- currCursorRow = origCursorRow
- currCursorCol = origCursorCol
- RETURN